<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>My JSP 'register.jsp' starting page</title>
	</head>
	<body>
	<center><h3>管理员登陆</h3>
	<h3>
				<a href="/Struts2new/list.action">查看新闻</a>
			</h3></center>
		<table align="center" width="40%">
			<tr>
				<td>
					<s:fielderror cssStyle="color:red;"/>
				</td>
			</tr>
		</table>
		<s:form action="login" theme="simple">
			<table align="center" width="40%" border="1">
				<tr>
					<td>
						用户名：
					</td>
					<td>
						<s:textfield name="admin.aname" label="用户名"></s:textfield>
					</td>
				</tr>
				<tr>
					<td>
						密码：
					</td>
					<td>
						<s:password name="admin.apassword" label="密码"></s:password>
					</td>
				</tr>
				<tr>
					<td>
						<s:submit value="登陆" />
					</td>
					<td>
						<s:reset value="重置" />
					</td>
				</tr>
			</table>
		</s:form>
	</body>
</html>
